<%-- 
    Document   : viewJobs
    Created on : Jun 30, 2012, 8:50:32 AM
    Author     : Kyros
--%>

<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Manage Job Offers</title>
        <script type="text/javascript" src="script/RegisterChecking.js"></script>
        <link href="css/Main.css" rel="stylesheet" type="text/css" />        
    </head>

    <body>	

        <table width="1000" border="0" align="center">
            <tr>
                <td colspan="3" align="right">
                    Welcome, ${sessionScope.USERNAME},         
                    <c:url var="Logout" value="Controller">
                        <c:param name="action" value="Logout"/>
                    </c:url>
                    <a href="${Logout}" class="Sign">Logout</a><br/><br/>

                </td>
            </tr>

            <tr>
                <td><img src="images/logo-job-portal.png" alt="" width="269" height="56" /></td>
                <td colspan="2">
                    <table border="0" id="wrap">
                        <tr id="menu">
                            <td width="100"></td>
                            <td class="shadow"><a href="home.jsp">HomePage</a></td>
                            <td width="10"></td>
                            <td class="shadow"><a href="aboutUs.jsp">About Us</a></td>
                            <td width="10"></td>
                            <td class="shadow"><a href="help.jsp">Help</a></td>
                            <td width="10"></td>
                            <td class="shadow"><a href="employerPage.jsp">Employer</a></td>
                            <td width="10"></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="3" align="center"><img src="images/bigpicture.jpg" width="1049" height="303" /></td>
            </tr>

            <tr><td colspan="3"><table width="600" border="0" align="center"><tr><td></td><td></td><td></td></tr></table></td></tr>
            <!--<tr>
                  <td colspan="3" align="center">
                  <table width="600" border="0" align="center">
                          <tr>
                          <td id="search" width="78"><label>Search</label></td>
                          <td width="272"><input type="search" name="txtSearch" size="30" placeholder="Input your search here" /></td>
                          <td width="236"><input name="btnSearch" type="button" value="  Search  " /></td>
                      </tr>
                  </table>
              </td>
            </tr>	-->
            <tr>
                <td><img src="images/left.png" width="208" height="975" /></td>
                <td width="800" rowspan="3" align="center" valign="top">

                    
                    <h1>Job Filter</h1>
                    <form action="Controller" method="POST">
                        <label class="search">Name </label><input type="search" name="searchName" value="" placeholder="Name of the job"/>
                        <label class="search">Career </label> <input type="search" name="searchCareer" value="" placeholder="Career"/>
                        <label class="search">City </label> <select size="1" name="searchCity">
                                 <option value="Ha Noi">Ha Noi</option>
                                 <option value ="Ho Chi Minh">Ho Chi Minh</option>
                                 <option value ="Da Nang">Da Nang</option>
                                 <option value ="Can Tho">Can Tho</option>
                                 <option value ="Hue">Hue</option>
                                 <option value ="Ca Mau">Ca Mau</option>
                                 <option value ="Other">Other</option>
                        </select><br/>
                        <input type="submit" name="action" value="Search"/>
                    </form>
                    <br />
                    <c:set var="list" value="${requestScope.INFO}"/>
                    <c:if test="${not empty list}">
                        <table border="1">
                            <thead>
                                <tr>
                                    <td>Job Id</td>
                                    <td>Job Name</td>
                                    <td>Career</td>
                                    <td>City</td>
                                    <td>Salary Offer</td>
                                    <td>Job Benefit</td>
                                    <td>Job Limit</td>
                                    <td>Need Position</td>
                                    <td>Profile Requirement</td>
                                    <td>Action</td>
                                </tr>
                            </thead>
                            <tBody>
                                <c:set var="count" value="0"/>
                                <c:forEach var="job" items="${list}">
                                    <tr>
                                        <td>${job.jobId}</td>
                                        <td>${job.jobName}</td>
                                        <td>${job.career}</td>
                                        <td>${job.city}</td>
                                        <td>${job.salaryOffer}</td>
                                        <td>${job.jobBenefit}</td>
                                        <td>${job.jobLimit}</td>
                                        <td>${job.neededPos}</td>
                                        <td>${job.profileRequire}</td>
                                        <c:url var="delete" value="Controller">
                                            <c:param name="action" value="delete"/>
                                            <c:param name="jobId" value="${job.jobId}"/>
                                        </c:url>
                                        <c:url var="edit" value="Controller">
                                            <c:param name="action" value="edit"/>
                                            <c:param name="jobId" value="${job.jobId}"/>
                                        </c:url>                            
                                        <td><a href="${edit}" class="viewDetail">Edit</a><br/><a href="${delete}" class="viewDetail">Delete</a></td>
                                    </tr>
                                </c:forEach>
                            </tBody>
                        </table>
                    </c:if>






                </td>
                <td><img src="images/right.png" width="208" height="975" /></td>
            </tr>
        </table>
    </body>
</html>